<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/list_header.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap.min.css">
<script type="text/javascript"src="__PUBLIC__/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript"src="__PUBLIC__/js/bootstrap.min.js"></script>

<title>{$title}</title>
<style>
#sort span{margin:5px;font-size:15px;}
#sort{margin:5px;}
#sortTable{width:50%;margin:5px;}
#content span{margin:5px;font-size:15px;}
#content{margin:10px;}
small{margin:5px;}
</style>
<script>

	function check(){
		
		var checkbox=document.getElementById('checkbox');
		if(checkbox.checked==true){
			//被选中时，跳转
			window.location.href="__APP__/Home/List/index?type=showFlagOnly";
			
		}else window.location.href="__APP__/Home/List/index";
	}
	
	$('document').ready(function(){
			var type=$.getUrlVar('type');
			if(type=="showFlagOnly"){
				var checkbox=document.getElementById('checkbox');
				checkbox.checked=true;
				}
		});

	//获取url中的参数，摘自网络
	$.extend({
		  getUrlVars: function(){
		    var vars = [], hash;
		    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
		    for(var i = 0; i < hashes.length; i++)
		    {
		      hash = hashes[i].split('=');
		      vars.push(hash[0]);
		      vars[hash[0]] = hash[1];
		    }
		    return vars;
		  },
		  getUrlVar: function(name){
		    return $.getUrlVars()[name];
		  }
		});

</script>

</head>
<body>

<include file="Public/list_header"/>

<present name="notice">
<div id="myAlert" class="alert alert-warning">
   <a href="#" class="close" data-dismiss="alert">
   &times;
   </a>
   <span>{$notice}</span>
</div>
</present>

<div id="content">
<span  class="label label-success">系统成员列表</span><span><label class="checkbox inline" >只看在任<input type="checkbox"id="checkbox" value="showFlagOnly"onchange="check();"></label></span>
<table class="table table-striped table-hover table-bordered">
<tr><th>所属组</th><th>用户名</th><th>年级</th><th>性别</th><th>手机长号</th><th>手机短号</th><th>QQ</th><th>详细地址</th><th>学号</th><th>学院</th><th>专业</th><th>微信</th><th>操作</th></tr>
<volist name="list" id="vo" >
<tr><td>{$vo.groupname}</td><td>{$vo.username}<span class="badge"><if condition="($vo.flag eq 1)"><else />retire</if></span></td><td>{$vo.grade}</td><td>{$vo.sex}</td><td>{$vo.longnum}</td><td>{$vo.shortnum}</td><td>{$vo.qq}</td><td>{$vo.address}</td><td>{$vo.student_id}</td><td>{$vo.college}</td><td>{$vo.subject}</td><td>{$vo.weixin}</td><td><a class="btn btn-info" href="__APP__/Home/List/userInfo?username={$vo.username}">more</a></td></tr>
</volist>
</table>
<span id="page">{$page}</span>
</div>
<div id="sort">
<span  class="label label-success">人员统计</span><span class="label ">全部人员：{$allMember}人</span><span class="label label-warning">在任人员：{$flagMember}人</span>
</div>
<div id="sortTable">
<table class="table table-striped table-hover table-bordered" width="80%">
<tr>
<th >分组</th>
<volist name="groupTitle" id="so">

<th ><a href="__APP__/Home/List/sortInfo?groupname={$so}">{$so}</a></th>
</volist>
</tr>
<tr>
<td>人数</td>
<volist name="sortNum" id="so">
<td>{$so}</td>
</volist>
</tr>
</table>
</div>

</body>
</html>